package io.polly.ldz.webflux.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.relational.core.mapping.Table;

import java.time.Instant;
import java.util.Date;
import java.util.List;

@Table("t_question")
@Data
public class Question {

    @Id
    Long questionId;
    //text 且整体作为整体的index
    String title;
    int balance;
//    Date createTime;
    Instant createTime;//或用localXxx
//    @JsonProperty("questionContent")解决ES中字段与实体类字段不一致的问题
    String content;

    //bufferUntilChanged.map(list->{})
    @Transient //临时字段，并不在表中  flow.range(1,10).bufferUntilChanged(rowMap - >Long.parseLong(rowMap.get("id").toString()))
    List<String> tags;
}
